/**
 * 
 */
package com.alstudio.event;

import com.alstudio.event.ALEventDeliver.ALEventDeliverWorkingStateCallback;
import com.alstudio.utils.log.ALLog;

/**
 * ALEventDeliverWorkingStateObserver用于监听ALEventDeliver事件管理器工作状态
 * @author alonso lee
 *
 */
public class ALEventDeliverWorkingStateObserver implements
		ALEventDeliverWorkingStateCallback {

	/* (non-Javadoc)
	 * @see com.alstudio.event.ALEventDeliver.ALEventDeliverWorkingStateCallback#onSubscriberRegister(java.lang.Object)
	 */
	@Override
	public void onSubscriberRegister(Object subscriber) {
		// TODO Auto-generated method stub
		ALLog.i("ALEventDeliver 事件管理器注册了新的事件订阅对象: "+subscriber.getClass().getSimpleName());

	}

	/* (non-Javadoc)
	 * @see com.alstudio.event.ALEventDeliver.ALEventDeliverWorkingStateCallback#onSubscriberUnRegister(java.lang.Object)
	 */
	@Override
	public void onSubscriberUnRegister(Object subscriber) {
		// TODO Auto-generated method stub
		ALLog.i("ALEventDeliver 事件管理器解除事件订阅对象: "+subscriber.getClass().getSimpleName());
	}

	/* (non-Javadoc)
	 * @see com.alstudio.event.ALEventDeliver.ALEventDeliverWorkingStateCallback#onPostStart(java.lang.Object)
	 */
	@Override
	public void onPostStart(Object event) {
		// TODO Auto-generated method stub
		ALLog.i("ALEventDeliver 开始投递事件: "+event.getClass().getSimpleName());
	}

	/* (non-Javadoc)
	 * @see com.alstudio.event.ALEventDeliver.ALEventDeliverWorkingStateCallback#onStartPostToSubscriber(java.lang.Object, java.lang.Object)
	 */
	@Override
	public void onStartPostToSubscriber(Object subscriber, Object event) {
		// TODO Auto-generated method stub
		ALLog.i("ALEventDeliver 开始投递事件: "+event.getClass().getSimpleName()+" 到: "+subscriber.getClass().getSimpleName());
	}

	/* (non-Javadoc)
	 * @see com.alstudio.event.ALEventDeliver.ALEventDeliverWorkingStateCallback#onPostCancel()
	 */
	@Override
	public void onPostCancel() {
		// TODO Auto-generated method stub
		ALLog.i("ALEventDeliver 取消投递事件 ");
	}

	/* (non-Javadoc)
	 * @see com.alstudio.event.ALEventDeliver.ALEventDeliverWorkingStateCallback#onPostToSubscriberCompleted(java.lang.Object, java.lang.Object)
	 */
	@Override
	public void onPostToSubscriberCompleted(Object subscriber, Object event) {
		// TODO Auto-generated method stub
		ALLog.i("ALEventDeliver 完成投递事件: "+event.getClass().getSimpleName()+" 到 "+subscriber.getClass().getSimpleName());
	}

	/* (non-Javadoc)
	 * @see com.alstudio.event.ALEventDeliver.ALEventDeliverWorkingStateCallback#onPostCompleted(java.lang.Object)
	 */
	@Override
	public void onPostCompleted(Object event) {
		// TODO Auto-generated method stub
		ALLog.i("ALEventDeliver 完成投递事件: "+event.getClass().getSimpleName());
	}

}
